package com.zbkj.service.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zbkj.common.model.aapoint.AdUser;
import com.zbkj.service.dao.PointAdUserMapper;
import com.zbkj.service.service.PointAdUserService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;


@RequiredArgsConstructor
@Service
@DS("pointarchive")
public class PointAdUserServiceImpl
        extends ServiceImpl<PointAdUserMapper, AdUser>
        implements PointAdUserService {

    @Override
    public int updateUserPwd(AdUser adUser) {
        return this.baseMapper.update(adUser, new LambdaUpdateWrapper<AdUser>()
                .eq(AdUser::getMerId, adUser.getMerId())
                .set(AdUser::getMerPwd, adUser.getMerPwd())
                .set(AdUser::getMerAccount, adUser.getMerAccount()));
    }
}
